<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>mcpwm.h File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../vesc.jpg"/></td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li><a href="../../annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
      <li><a href="../../globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">mcpwm.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="../../df/df4/conf__general_8h_source.html">conf_general.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="../../dc/d51/datatypes_8h_source.html">datatypes.h</a>&quot;</code><br />
<code>#include &lt;stdbool.h&gt;</code><br />
</div>
<p><a href="../../d4/d38/mcpwm_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a0d1206613a23135d2ad67c961fcd86a8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a0d1206613a23135d2ad67c961fcd86a8">MCPWM_SWITCH_FREQUENCY_MIN</a>&#160;&#160;&#160;3000</td></tr>
<tr class="separator:a0d1206613a23135d2ad67c961fcd86a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a220210c9d8362e1006daacf083302ac6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a220210c9d8362e1006daacf083302ac6">MCPWM_SWITCH_FREQUENCY_MAX</a>&#160;&#160;&#160;40000</td></tr>
<tr class="separator:a220210c9d8362e1006daacf083302ac6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d7cc0d242a219aeefb8197fc4d6bbb1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a1d7cc0d242a219aeefb8197fc4d6bbb1">MCPWM_SWITCH_FREQUENCY_DC_MOTOR</a>&#160;&#160;&#160;25000</td></tr>
<tr class="separator:a1d7cc0d242a219aeefb8197fc4d6bbb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af326efcbabf49b6657bdc53d4ebbf8a6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#af326efcbabf49b6657bdc53d4ebbf8a6">MCPWM_DEAD_TIME_CYCLES</a>&#160;&#160;&#160;100</td></tr>
<tr class="separator:af326efcbabf49b6657bdc53d4ebbf8a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a916c035a72adb2b996c1c67250a867"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a9a916c035a72adb2b996c1c67250a867">MCPWM_RPM_TIMER_FREQ</a>&#160;&#160;&#160;1000000.0</td></tr>
<tr class="separator:a9a916c035a72adb2b996c1c67250a867"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fe34dbe691b4ee69ea087e40323c38c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a9fe34dbe691b4ee69ea087e40323c38c">MCPWM_CMD_STOP_TIME</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a9fe34dbe691b4ee69ea087e40323c38c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b488809f7755e1f611e6f0635685c6d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a2b488809f7755e1f611e6f0635685c6d">MCPWM_DETECT_STOP_TIME</a>&#160;&#160;&#160;500</td></tr>
<tr class="separator:a2b488809f7755e1f611e6f0635685c6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab2f67a9864fe0d38361b1a2264c4e3c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#aab2f67a9864fe0d38361b1a2264c4e3c">MCPWM_PID_TIME_K</a>&#160;&#160;&#160;0.001</td></tr>
<tr class="separator:aab2f67a9864fe0d38361b1a2264c4e3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a741df16681b89fa88b1dfdc148e9c247"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a741df16681b89fa88b1dfdc148e9c247">mcpwm_init</a> (<a class="el" href="../../d5/d42/structmc__configuration.html">mc_configuration</a> *configuration)</td></tr>
<tr class="separator:a741df16681b89fa88b1dfdc148e9c247"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a5d94aa8dfe85c2e2eb8bcedc4cc9e2"><td class="memItemLeft" align="right" valign="top">const volatile <a class="el" href="../../d5/d42/structmc__configuration.html">mc_configuration</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a6a5d94aa8dfe85c2e2eb8bcedc4cc9e2">mcpwm_get_configuration</a> (void)</td></tr>
<tr class="separator:a6a5d94aa8dfe85c2e2eb8bcedc4cc9e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0c84721a6bd9e03bcdc83997dceb0bd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#af0c84721a6bd9e03bcdc83997dceb0bd">mcpwm_set_configuration</a> (<a class="el" href="../../d5/d42/structmc__configuration.html">mc_configuration</a> *configuration)</td></tr>
<tr class="separator:af0c84721a6bd9e03bcdc83997dceb0bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0ded721a702fcc2f419e348dfb2394e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#ab0ded721a702fcc2f419e348dfb2394e">mcpwm_init_hall_table</a> (int8_t *table)</td></tr>
<tr class="separator:ab0ded721a702fcc2f419e348dfb2394e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dd57224b5a0906f51f63deb04575fda"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a9dd57224b5a0906f51f63deb04575fda">mcpwm_set_duty</a> (float dutyCycle)</td></tr>
<tr class="separator:a9dd57224b5a0906f51f63deb04575fda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0ea3c433002e0c6152f1e8c336ea773"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#ac0ea3c433002e0c6152f1e8c336ea773">mcpwm_set_pid_speed</a> (float rpm)</td></tr>
<tr class="separator:ac0ea3c433002e0c6152f1e8c336ea773"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a947be2c19679b5d18b593fd43b3bbc5f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a947be2c19679b5d18b593fd43b3bbc5f">mcpwm_set_pid_pos</a> (float pos)</td></tr>
<tr class="separator:a947be2c19679b5d18b593fd43b3bbc5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8cce9e7089ba5b002f4bf38211ed27a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#ac8cce9e7089ba5b002f4bf38211ed27a">mcpwm_set_current</a> (float current)</td></tr>
<tr class="separator:ac8cce9e7089ba5b002f4bf38211ed27a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5a0f5ec4944da39e9192d1fee78c5ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#af5a0f5ec4944da39e9192d1fee78c5ad">mcpwm_set_brake_current</a> (float current)</td></tr>
<tr class="separator:af5a0f5ec4944da39e9192d1fee78c5ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a059e73c08f17b8f9c0f367903f9d5c0b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a059e73c08f17b8f9c0f367903f9d5c0b">mcpwm_brake_now</a> (void)</td></tr>
<tr class="separator:a059e73c08f17b8f9c0f367903f9d5c0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a060e6f8cceedc217d4cda3dc7e255acb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a060e6f8cceedc217d4cda3dc7e255acb">mcpwm_release_motor</a> (void)</td></tr>
<tr class="separator:a060e6f8cceedc217d4cda3dc7e255acb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a950110bbb0c5db30530775f3ad8c7c8f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a950110bbb0c5db30530775f3ad8c7c8f">mcpwm_lock</a> (void)</td></tr>
<tr class="separator:a950110bbb0c5db30530775f3ad8c7c8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9833abbb75ecaec36ea2f2ae6afa14e3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a9833abbb75ecaec36ea2f2ae6afa14e3">mcpwm_unlock</a> (void)</td></tr>
<tr class="separator:a9833abbb75ecaec36ea2f2ae6afa14e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01ee78893a848db2a0a265d85516d89d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a01ee78893a848db2a0a265d85516d89d">mcpwm_lock_override_once</a> (void)</td></tr>
<tr class="separator:a01ee78893a848db2a0a265d85516d89d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2acaf5174aa1f04744dd0b2355cfe9c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#ad2acaf5174aa1f04744dd0b2355cfe9c">mcpwm_get_comm_step</a> (void)</td></tr>
<tr class="separator:ad2acaf5174aa1f04744dd0b2355cfe9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf9e2e82ba6197cccca4980be9d82e86"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#abf9e2e82ba6197cccca4980be9d82e86">mcpwm_get_duty_cycle_set</a> (void)</td></tr>
<tr class="separator:abf9e2e82ba6197cccca4980be9d82e86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a055e8c23ee46051aa3e9c8eb5a62da31"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a055e8c23ee46051aa3e9c8eb5a62da31">mcpwm_get_duty_cycle_now</a> (void)</td></tr>
<tr class="separator:a055e8c23ee46051aa3e9c8eb5a62da31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c11fd7cd576b8545639d70ad9068bb6"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a2c11fd7cd576b8545639d70ad9068bb6">mcpwm_get_switching_frequency_now</a> (void)</td></tr>
<tr class="separator:a2c11fd7cd576b8545639d70ad9068bb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa48e2f10a4519f28a8cedf114ddd39fa"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#aa48e2f10a4519f28a8cedf114ddd39fa">mcpwm_get_rpm</a> (void)</td></tr>
<tr class="separator:aa48e2f10a4519f28a8cedf114ddd39fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a877cbb1f32dab9cc76d8aad64b2aa1ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../dc/d51/datatypes_8h.html#a31ba5ae9b4a53237b5b76db71ca0299a">mc_state</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a877cbb1f32dab9cc76d8aad64b2aa1ed">mcpwm_get_state</a> (void)</td></tr>
<tr class="separator:a877cbb1f32dab9cc76d8aad64b2aa1ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a543e86f6faec79974352738009a9da40"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../dc/d51/datatypes_8h.html#a29724157fc2c874a0bafeb059b571d14">mc_fault_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a543e86f6faec79974352738009a9da40">mcpwm_get_fault</a> (void)</td></tr>
<tr class="separator:a543e86f6faec79974352738009a9da40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7795f8c26fddcf448afa3d25623ae4e9"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a7795f8c26fddcf448afa3d25623ae4e9">mcpwm_fault_to_string</a> (<a class="el" href="../../dc/d51/datatypes_8h.html#a29724157fc2c874a0bafeb059b571d14">mc_fault_code</a> fault)</td></tr>
<tr class="separator:a7795f8c26fddcf448afa3d25623ae4e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2755a29a5e5899b14bf3a8885cee5fad"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a2755a29a5e5899b14bf3a8885cee5fad">mcpwm_get_kv</a> (void)</td></tr>
<tr class="separator:a2755a29a5e5899b14bf3a8885cee5fad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a381642f17c64e43bc0d1ee711dcf65eb"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a381642f17c64e43bc0d1ee711dcf65eb">mcpwm_get_kv_filtered</a> (void)</td></tr>
<tr class="separator:a381642f17c64e43bc0d1ee711dcf65eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a095a677c5faec19ad0e58cf18a371c1f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a095a677c5faec19ad0e58cf18a371c1f">mcpwm_get_tachometer_value</a> (bool reset)</td></tr>
<tr class="separator:a095a677c5faec19ad0e58cf18a371c1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a669cef28cf150b9bb377db52bf38f3aa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a669cef28cf150b9bb377db52bf38f3aa">mcpwm_get_tachometer_abs_value</a> (bool reset)</td></tr>
<tr class="separator:a669cef28cf150b9bb377db52bf38f3aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e52e42e3bf9eb9b3a6c20e234c35dd3"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a2e52e42e3bf9eb9b3a6c20e234c35dd3">mcpwm_get_amp_hours</a> (bool reset)</td></tr>
<tr class="separator:a2e52e42e3bf9eb9b3a6c20e234c35dd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6138c5d1ee524398afef60eb74b6572"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#ab6138c5d1ee524398afef60eb74b6572">mcpwm_get_amp_hours_charged</a> (bool reset)</td></tr>
<tr class="separator:ab6138c5d1ee524398afef60eb74b6572"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6528d34554fe5f88bac0a7c04c26d6f8"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a6528d34554fe5f88bac0a7c04c26d6f8">mcpwm_get_watt_hours</a> (bool reset)</td></tr>
<tr class="separator:a6528d34554fe5f88bac0a7c04c26d6f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a8f41dcfa397ba1197e9cd139f391b4"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a0a8f41dcfa397ba1197e9cd139f391b4">mcpwm_get_watt_hours_charged</a> (bool reset)</td></tr>
<tr class="separator:a0a8f41dcfa397ba1197e9cd139f391b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62cdbf8a4a38b8537d93c6bd1c01b91e"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a62cdbf8a4a38b8537d93c6bd1c01b91e">mcpwm_get_tot_current</a> (void)</td></tr>
<tr class="separator:a62cdbf8a4a38b8537d93c6bd1c01b91e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15bd545876cc438ccafe772971305f18"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a15bd545876cc438ccafe772971305f18">mcpwm_get_tot_current_filtered</a> (void)</td></tr>
<tr class="separator:a15bd545876cc438ccafe772971305f18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0b77e746e9a92a419d6114997fbd763"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#ac0b77e746e9a92a419d6114997fbd763">mcpwm_get_tot_current_directional</a> (void)</td></tr>
<tr class="separator:ac0b77e746e9a92a419d6114997fbd763"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a2c6e557a045f7e70a177aeb9e6268b"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a2a2c6e557a045f7e70a177aeb9e6268b">mcpwm_get_tot_current_directional_filtered</a> (void)</td></tr>
<tr class="separator:a2a2c6e557a045f7e70a177aeb9e6268b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a07d303d2dbeeb7d406031ec0245768"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a5a07d303d2dbeeb7d406031ec0245768">mcpwm_get_tot_current_in</a> (void)</td></tr>
<tr class="separator:a5a07d303d2dbeeb7d406031ec0245768"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a632b1e9f636f0e2dae31ae45704ad5ce"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a632b1e9f636f0e2dae31ae45704ad5ce">mcpwm_get_tot_current_in_filtered</a> (void)</td></tr>
<tr class="separator:a632b1e9f636f0e2dae31ae45704ad5ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee80954eb251a3cc7e3cbd9e2d72ad50"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#aee80954eb251a3cc7e3cbd9e2d72ad50">mcpwm_set_detect</a> (void)</td></tr>
<tr class="separator:aee80954eb251a3cc7e3cbd9e2d72ad50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75eba9ba5161ac581ad23fe0718de72e"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a75eba9ba5161ac581ad23fe0718de72e">mcpwm_get_detect_pos</a> (void)</td></tr>
<tr class="separator:a75eba9ba5161ac581ad23fe0718de72e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a811f97662c12f6c6f6db2d3ef653317e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a811f97662c12f6c6f6db2d3ef653317e">mcpwm_reset_hall_detect_table</a> (void)</td></tr>
<tr class="separator:a811f97662c12f6c6f6db2d3ef653317e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5c97caf8a3c2a33986a77a39d32f88f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#aa5c97caf8a3c2a33986a77a39d32f88f">mcpwm_get_hall_detect_result</a> (int8_t *table)</td></tr>
<tr class="separator:aa5c97caf8a3c2a33986a77a39d32f88f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3c4d35168fdd37ace78e17350785ff9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#af3c4d35168fdd37ace78e17350785ff9">mcpwm_read_hall_phase</a> (void)</td></tr>
<tr class="separator:af3c4d35168fdd37ace78e17350785ff9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af291b09431a336394d37f9faeca78263"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#af291b09431a336394d37f9faeca78263">mcpwm_read_reset_avg_motor_current</a> (void)</td></tr>
<tr class="separator:af291b09431a336394d37f9faeca78263"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e658badc7694a6fd3b20c66b42efeb8"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a6e658badc7694a6fd3b20c66b42efeb8">mcpwm_read_reset_avg_input_current</a> (void)</td></tr>
<tr class="separator:a6e658badc7694a6fd3b20c66b42efeb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aecc8d955f57997ec6ddb37d9923c1030"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#aecc8d955f57997ec6ddb37d9923c1030">mcpwm_read_reset_avg_cycle_integrator</a> (void)</td></tr>
<tr class="separator:aecc8d955f57997ec6ddb37d9923c1030"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56298b9a210017fcdf9eb982de492a80"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a56298b9a210017fcdf9eb982de492a80">mcpwm_set_min_rpm</a> (float rpm)</td></tr>
<tr class="separator:a56298b9a210017fcdf9eb982de492a80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40f44eb9a9076013bedd753a31e8ca01"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a40f44eb9a9076013bedd753a31e8ca01">mcpwm_get_min_rpm</a> (void)</td></tr>
<tr class="separator:a40f44eb9a9076013bedd753a31e8ca01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf1422a651e069f04434c76fd359f5d7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#adf1422a651e069f04434c76fd359f5d7">mcpwm_set_comm_mode</a> (<a class="el" href="../../dc/d51/datatypes_8h.html#af3916564ec22a69f58dea8b020011381">mc_comm_mode</a> mode)</td></tr>
<tr class="separator:adf1422a651e069f04434c76fd359f5d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ebe7d5c7ed7ac5f336aab186a23377f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../dc/d51/datatypes_8h.html#af3916564ec22a69f58dea8b020011381">mc_comm_mode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a7ebe7d5c7ed7ac5f336aab186a23377f">mcpwm_get_comm_mode</a> (void)</td></tr>
<tr class="separator:a7ebe7d5c7ed7ac5f336aab186a23377f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad04a5f41ac3b2dbdff88e925f5a7c867"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#ad04a5f41ac3b2dbdff88e925f5a7c867">mcpwm_get_last_adc_isr_duration</a> (void)</td></tr>
<tr class="separator:ad04a5f41ac3b2dbdff88e925f5a7c867"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbf59470d2a43800159793dcf9a2fa1c"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#afbf59470d2a43800159793dcf9a2fa1c">mcpwm_get_last_inj_adc_isr_duration</a> (void)</td></tr>
<tr class="separator:afbf59470d2a43800159793dcf9a2fa1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e00de142622d9a94d6ff0711850c0e9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d2/df7/structmc__rpm__dep__struct.html">mc_rpm_dep_struct</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a3e00de142622d9a94d6ff0711850c0e9">mcpwm_get_rpm_dep</a> (void)</td></tr>
<tr class="separator:a3e00de142622d9a94d6ff0711850c0e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a472294b4fc68a52694b3b2751a473b96"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a472294b4fc68a52694b3b2751a473b96">mcpwm_adc_inj_int_handler</a> (void)</td></tr>
<tr class="separator:a472294b4fc68a52694b3b2751a473b96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adab2ce19bc6cbb9ea59523665612c39a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#adab2ce19bc6cbb9ea59523665612c39a">mcpwm_adc_int_handler</a> (void *p, uint32_t flags)</td></tr>
<tr class="separator:adab2ce19bc6cbb9ea59523665612c39a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a4b6f5d6b8377b04320967c8a3ae33c8c"><td class="memItemLeft" align="right" valign="top">volatile uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a4b6f5d6b8377b04320967c8a3ae33c8c">ADC_Value</a> []</td></tr>
<tr class="separator:a4b6f5d6b8377b04320967c8a3ae33c8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9891bb6ef7ae8af63a4199ca2b713089"><td class="memItemLeft" align="right" valign="top">volatile int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a9891bb6ef7ae8af63a4199ca2b713089">ADC_curr_norm_value</a> []</td></tr>
<tr class="separator:a9891bb6ef7ae8af63a4199ca2b713089"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a438be5fa1cc0a77752c7b8219b76de3c"><td class="memItemLeft" align="right" valign="top">volatile float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a438be5fa1cc0a77752c7b8219b76de3c">mcpwm_detect_currents</a> []</td></tr>
<tr class="separator:a438be5fa1cc0a77752c7b8219b76de3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e57d9387f870f861edf7d0b79ed94d5"><td class="memItemLeft" align="right" valign="top">volatile float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#a9e57d9387f870f861edf7d0b79ed94d5">mcpwm_detect_voltages</a> []</td></tr>
<tr class="separator:a9e57d9387f870f861edf7d0b79ed94d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acef66d9057fc8993c6743f96058d0246"><td class="memItemLeft" align="right" valign="top">volatile float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#acef66d9057fc8993c6743f96058d0246">mcpwm_detect_currents_diff</a> []</td></tr>
<tr class="separator:acef66d9057fc8993c6743f96058d0246"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2e911423c3781dd1296002d54bf0fa0"><td class="memItemLeft" align="right" valign="top">volatile int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d38/mcpwm_8h.html#aa2e911423c3781dd1296002d54bf0fa0">mcpwm_vzero</a></td></tr>
<tr class="separator:aa2e911423c3781dd1296002d54bf0fa0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a9fe34dbe691b4ee69ea087e40323c38c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MCPWM_CMD_STOP_TIME&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="af326efcbabf49b6657bdc53d4ebbf8a6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MCPWM_DEAD_TIME_CYCLES&#160;&#160;&#160;100</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a2b488809f7755e1f611e6f0635685c6d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MCPWM_DETECT_STOP_TIME&#160;&#160;&#160;500</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aab2f67a9864fe0d38361b1a2264c4e3c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MCPWM_PID_TIME_K&#160;&#160;&#160;0.001</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a9a916c035a72adb2b996c1c67250a867"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MCPWM_RPM_TIMER_FREQ&#160;&#160;&#160;1000000.0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a1d7cc0d242a219aeefb8197fc4d6bbb1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MCPWM_SWITCH_FREQUENCY_DC_MOTOR&#160;&#160;&#160;25000</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a220210c9d8362e1006daacf083302ac6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MCPWM_SWITCH_FREQUENCY_MAX&#160;&#160;&#160;40000</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a0d1206613a23135d2ad67c961fcd86a8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MCPWM_SWITCH_FREQUENCY_MIN&#160;&#160;&#160;3000</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a472294b4fc68a52694b3b2751a473b96"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_adc_inj_int_handler </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="adab2ce19bc6cbb9ea59523665612c39a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_adc_int_handler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a059e73c08f17b8f9c0f367903f9d5c0b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_brake_now </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Stop the motor and use braking. </p>

</div>
</div>
<a class="anchor" id="a7795f8c26fddcf448afa3d25623ae4e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* mcpwm_fault_to_string </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d51/datatypes_8h.html#a29724157fc2c874a0bafeb059b571d14">mc_fault_code</a>&#160;</td>
          <td class="paramname"><em>fault</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a2e52e42e3bf9eb9b3a6c20e234c35dd3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_amp_hours </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>reset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the amount of amp hours drawn from the input source.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reset</td><td>If true, the counter will be reset after this call.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The amount of amp hours drawn. </dd></dl>

</div>
</div>
<a class="anchor" id="ab6138c5d1ee524398afef60eb74b6572"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_amp_hours_charged </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>reset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the amount of amp hours fed back into the input source.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reset</td><td>If true, the counter will be reset after this call.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The amount of amp hours fed back. </dd></dl>

</div>
</div>
<a class="anchor" id="a7ebe7d5c7ed7ac5f336aab186a23377f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d51/datatypes_8h.html#af3916564ec22a69f58dea8b020011381">mc_comm_mode</a> mcpwm_get_comm_mode </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ad2acaf5174aa1f04744dd0b2355cfe9c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mcpwm_get_comm_step </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the electrical position (or commutation step) of the motor.</p>
<dl class="section return"><dt>Returns</dt><dd>The current commutation step. Range [1 6] </dd></dl>

</div>
</div>
<a class="anchor" id="a6a5d94aa8dfe85c2e2eb8bcedc4cc9e2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const volatile <a class="el" href="../../d5/d42/structmc__configuration.html">mc_configuration</a>* mcpwm_get_configuration </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a75eba9ba5161ac581ad23fe0718de72e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_detect_pos </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a055e8c23ee46051aa3e9c8eb5a62da31"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_duty_cycle_now </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="abf9e2e82ba6197cccca4980be9d82e86"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_duty_cycle_set </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a543e86f6faec79974352738009a9da40"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d51/datatypes_8h.html#a29724157fc2c874a0bafeb059b571d14">mc_fault_code</a> mcpwm_get_fault </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aa5c97caf8a3c2a33986a77a39d32f88f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mcpwm_get_hall_detect_result </td>
          <td>(</td>
          <td class="paramtype">int8_t *&#160;</td>
          <td class="paramname"><em>table</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the current detected hall sensor table</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">table</td><td>Pointer to a table where the result should be stored</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0: OK -1: Invalid hall sensor output -2: WS2811 enabled -3: Encoder enabled </dd></dl>

</div>
</div>
<a class="anchor" id="a2755a29a5e5899b14bf3a8885cee5fad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_kv </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Calculate the KV (RPM per volt) value for the motor. This function has to be used while the motor is moving. Note that the return value has to be divided by half the number of motor poles.</p>
<dl class="section return"><dt>Returns</dt><dd>The KV value. </dd></dl>

</div>
</div>
<a class="anchor" id="a381642f17c64e43bc0d1ee711dcf65eb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_kv_filtered </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Calculate the FIR-filtered KV (RPM per volt) value for the motor. This function has to be used while the motor is moving. Note that the return value has to be divided by half the number of motor poles.</p>
<dl class="section return"><dt>Returns</dt><dd>The filtered KV value. </dd></dl>

</div>
</div>
<a class="anchor" id="ad04a5f41ac3b2dbdff88e925f5a7c867"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_last_adc_isr_duration </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="afbf59470d2a43800159793dcf9a2fa1c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_last_inj_adc_isr_duration </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a40f44eb9a9076013bedd753a31e8ca01"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_min_rpm </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the minimum allowed RPM in sensorless mode.</p>
<dl class="section return"><dt>Returns</dt><dd>The minimum allowed RPM. </dd></dl>

</div>
</div>
<a class="anchor" id="aa48e2f10a4519f28a8cedf114ddd39fa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_rpm </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Calculate the current RPM of the motor. This is a signed value and the sign depends on the direction the motor is rotating in. Note that this value has to be divided by half the number of motor poles.</p>
<dl class="section return"><dt>Returns</dt><dd>The RPM value. </dd></dl>

</div>
</div>
<a class="anchor" id="a3e00de142622d9a94d6ff0711850c0e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d2/df7/structmc__rpm__dep__struct.html">mc_rpm_dep_struct</a> mcpwm_get_rpm_dep </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a877cbb1f32dab9cc76d8aad64b2aa1ed"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d51/datatypes_8h.html#a31ba5ae9b4a53237b5b76db71ca0299a">mc_state</a> mcpwm_get_state </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a2c11fd7cd576b8545639d70ad9068bb6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_switching_frequency_now </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the current switching frequency.</p>
<dl class="section return"><dt>Returns</dt><dd>The switching frequency in Hz. </dd></dl>

</div>
</div>
<a class="anchor" id="a669cef28cf150b9bb377db52bf38f3aa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mcpwm_get_tachometer_abs_value </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>reset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read the absolute number of steps the motor has rotated.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reset</td><td>If true, the tachometer counter will be reset after this call.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The tachometer value in motor steps. The number of motor revolutions will be this number divided by (3 * MOTOR_POLE_NUMBER). </dd></dl>

</div>
</div>
<a class="anchor" id="a095a677c5faec19ad0e58cf18a371c1f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mcpwm_get_tachometer_value </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>reset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read the number of steps the motor has rotated. This number is signed and will return a negative number when the motor is rotating backwards.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reset</td><td>If true, the tachometer counter will be reset after this call.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The tachometer value in motor steps. The number of motor revolutions will be this number divided by (3 * MOTOR_POLE_NUMBER). </dd></dl>

</div>
</div>
<a class="anchor" id="a62cdbf8a4a38b8537d93c6bd1c01b91e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_tot_current </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the motor current. The sign of this value will represent whether the motor is drawing (positive) or generating (negative) current.</p>
<dl class="section return"><dt>Returns</dt><dd>The motor current. </dd></dl>

</div>
</div>
<a class="anchor" id="ac0b77e746e9a92a419d6114997fbd763"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_tot_current_directional </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the motor current. The sign of this value represents the direction in which the motor generates torque.</p>
<dl class="section return"><dt>Returns</dt><dd>The motor current. </dd></dl>

</div>
</div>
<a class="anchor" id="a2a2c6e557a045f7e70a177aeb9e6268b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_tot_current_directional_filtered </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the filtered motor current. The sign of this value represents the direction in which the motor generates torque.</p>
<dl class="section return"><dt>Returns</dt><dd>The filtered motor current. </dd></dl>

</div>
</div>
<a class="anchor" id="a15bd545876cc438ccafe772971305f18"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_tot_current_filtered </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the FIR-filtered motor current. The sign of this value will represent whether the motor is drawing (positive) or generating (negative) current.</p>
<dl class="section return"><dt>Returns</dt><dd>The filtered motor current. </dd></dl>

</div>
</div>
<a class="anchor" id="a5a07d303d2dbeeb7d406031ec0245768"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_tot_current_in </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the input current to the motor controller.</p>
<dl class="section return"><dt>Returns</dt><dd>The input current. </dd></dl>

</div>
</div>
<a class="anchor" id="a632b1e9f636f0e2dae31ae45704ad5ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_tot_current_in_filtered </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the FIR-filtered input current to the motor controller.</p>
<dl class="section return"><dt>Returns</dt><dd>The filtered input current. </dd></dl>

</div>
</div>
<a class="anchor" id="a6528d34554fe5f88bac0a7c04c26d6f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_watt_hours </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>reset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the amount of watt hours drawn from the input source.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reset</td><td>If true, the counter will be reset after this call.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The amount of watt hours drawn. </dd></dl>

</div>
</div>
<a class="anchor" id="a0a8f41dcfa397ba1197e9cd139f391b4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_get_watt_hours_charged </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>reset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the amount of watt hours fed back into the input source.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reset</td><td>If true, the counter will be reset after this call.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The amount of watt hours fed back. </dd></dl>

</div>
</div>
<a class="anchor" id="a741df16681b89fa88b1dfdc148e9c247"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d5/d42/structmc__configuration.html">mc_configuration</a> *&#160;</td>
          <td class="paramname"><em>configuration</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ab0ded721a702fcc2f419e348dfb2394e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_init_hall_table </td>
          <td>(</td>
          <td class="paramtype">int8_t *&#160;</td>
          <td class="paramname"><em>table</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize the hall sensor lookup table</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">table</td><td>The commutations corresponding to the hall sensor states in the forward direction- </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a950110bbb0c5db30530775f3ad8c7c8f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_lock </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Lock the control by disabling all control commands. </p>

</div>
</div>
<a class="anchor" id="a01ee78893a848db2a0a265d85516d89d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_lock_override_once </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Allow just one motor control command in the locked state. </p>

</div>
</div>
<a class="anchor" id="af3c4d35168fdd37ace78e17350785ff9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mcpwm_read_hall_phase </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read the current phase of the motor using hall effect sensors </p><dl class="section return"><dt>Returns</dt><dd>The phase read. </dd></dl>

</div>
</div>
<a class="anchor" id="aecc8d955f57997ec6ddb37d9923c1030"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_read_reset_avg_cycle_integrator </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a6e658badc7694a6fd3b20c66b42efeb8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_read_reset_avg_input_current </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="af291b09431a336394d37f9faeca78263"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float mcpwm_read_reset_avg_motor_current </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a060e6f8cceedc217d4cda3dc7e255acb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_release_motor </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Disconnect the motor and let it turn freely. </p>

</div>
</div>
<a class="anchor" id="a811f97662c12f6c6f6db2d3ef653317e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_reset_hall_detect_table </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reset the hall sensor detection table </p>

</div>
</div>
<a class="anchor" id="af5a0f5ec4944da39e9192d1fee78c5ad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_set_brake_current </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>current</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Brake the motor with a desired current. Absolute values less than conf.cc_min_current will release the motor.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">current</td><td>The current to use. Positive and negative values give the same effect. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="adf1422a651e069f04434c76fd359f5d7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_set_comm_mode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d51/datatypes_8h.html#af3916564ec22a69f58dea8b020011381">mc_comm_mode</a>&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the commutation mode for sensorless commutation.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mode</td><td>COMM_MODE_INTEGRATE: More robust, but requires many parameters. COMM_MODE_DELAY: Like most hobby ESCs. Requires less parameters, but has worse startup and is less robust. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af0c84721a6bd9e03bcdc83997dceb0bd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_set_configuration </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d5/d42/structmc__configuration.html">mc_configuration</a> *&#160;</td>
          <td class="paramname"><em>configuration</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ac8cce9e7089ba5b002f4bf38211ed27a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_set_current </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>current</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Use current control and specify a goal current to use. The sign determines the direction of the torque. Absolute values less than conf.cc_min_current will release the motor.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">current</td><td>The current to use. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aee80954eb251a3cc7e3cbd9e2d72ad50"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_set_detect </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a9dd57224b5a0906f51f63deb04575fda"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_set_duty </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>dutyCycle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Use duty cycle control. Absolute values less than MCPWM_MIN_DUTY_CYCLE will stop the motor.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dutyCycle</td><td>The duty cycle to use. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a56298b9a210017fcdf9eb982de492a80"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_set_min_rpm </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>rpm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the minimum allowed RPM in sensorless mode. This will affect startup performance. WARNING: Setting this too high can break stuff.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rpm</td><td>The minimum allowed RPM. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a947be2c19679b5d18b593fd43b3bbc5f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_set_pid_pos </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>pos</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Use PID position control. Note that this only works when encoder support is enabled.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pos</td><td>The desired position of the motor in degrees. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac0ea3c433002e0c6152f1e8c336ea773"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_set_pid_speed </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>rpm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Use PID rpm control. Note that this value has to be multiplied by half of the number of motor poles.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rpm</td><td>The electrical RPM goal value to use. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9833abbb75ecaec36ea2f2ae6afa14e3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mcpwm_unlock </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unlock all control commands. </p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="a9891bb6ef7ae8af63a4199ca2b713089"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile int ADC_curr_norm_value[]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a4b6f5d6b8377b04320967c8a3ae33c8c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile uint16_t ADC_Value[]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a438be5fa1cc0a77752c7b8219b76de3c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile float mcpwm_detect_currents[]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="acef66d9057fc8993c6743f96058d0246"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile float mcpwm_detect_currents_diff[]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a9e57d9387f870f861edf7d0b79ed94d5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile float mcpwm_detect_voltages[]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aa2e911423c3781dd1296002d54bf0fa0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile int mcpwm_vzero</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://github.com/joshdellay" target="_new">Josh Dellay</a>